<!--<?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename" class="two">基本设置</a></li>
<li><a href="$basename&action=class">分类管理</a></li>
<li><a href="$basename&action=colony">群组管理</a></li>
<!-- <li><a href="$basename&action=log">日志管理</a></li> -->
<li><a href="$basename&action=argument">帖子管理</a></li>
<li><a href="$basename&action=cache">更新缓存</a></li>
</ul>
<div class="c"></div>

<form action="$basename&" method="post">
<input type="hidden" name="step" value="3">
<h2>基本设置</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="30%"><span class="xia2">是否开启群组：</span></td>
<td><input type="radio" name="config[groups_open]" value="1" $groups_open_Y>是
<input type="radio" name="config[groups_open]" value="0" $groups_open_N>否</td></tr>
<tr class="tr3"><td width="30%"><span class="xia2">是否允许创始人解散群组：</span></td>
<td><input type="radio" name="config[remove]" value="1" $remove_Y>是
<input type="radio" name="config[remove]" value="0" $remove_N>否</td></tr>
<tr class="tr3"><td><span class="xia2">是否允许注册新群组：</span></td>
<td><input type="radio" name="config[newcolony]" value="1" $newcolony_Y>是
<input type="radio" name="config[newcolony]" value="0" $newcolony_N>否</td></tr>
<tr class="tr3"><td width="30%"><span class="xia2">是否开启创建群组认证码：</span></td>
<td><input type="radio" name="config[groups_gdcheck]" value="1" $groups_gdcheck_Y /> 开启
<input type="radio" name="config[groups_gdcheck]" value="0" $groups_gdcheck_N /> 关闭</td></tr>
<tr class="tr3"><td width="30%"><span class="xia2">是否开启发表新主题认证码：</span></td>
<td><input type="radio" name="config[groups_p_gdcheck]" value="1" $groups_p_gdcheck_Y /> 开启
<input type="radio" name="config[groups_p_gdcheck]" value="0" $groups_p_gdcheck_N /> 关闭</td></tr>
<tr class="tr3"><td width="30%"><span class="xia2">是否开启创建群组验证问题：</span></td>
<td><input type="radio" name="config[groups_qcheck]" value="1" $groups_qcheck_Y /> 开启
<input type="radio" name="config[groups_qcheck]" value="0" $groups_qcheck_N /> 关闭</td></tr>
<tr class="tr3"><td width="30%"><span class="xia2">是否开启发表新主题验证问题：</span></td>
<td><input type="radio" name="config[groups_p_qcheck]" value="1" $groups_p_qcheck_Y /> 开启
<input type="radio" name="config[groups_p_qcheck]" value="0" $groups_p_qcheck_N /> 关闭</td></tr>
<tr class="tr3"><td><span class="xia2">选择群组的消费积分：</span></td>
<td>
<!--
EOT;
foreach ($credit->cType as $key => $value) {
$ifchecked = $o_moneytype==$key ? 'checked' : '';print <<<EOT
-->
<input type="radio" name="config[moneytype]" value="$key" $ifchecked> $value
<!--
EOT;
}print <<<EOT
--> 
（一旦设置，请勿随意更改）
</td></tr>
<tr class="tr3"><td><span class="xia2">创建一个群组所需{$moneyname}：</span></td>
<td><input name="config[createmoney]" size="30" class="input" value="$o_createmoney"></td></tr>

<tr class="tr3"><td><span class="xia2">每个会员最多能创建群组的个数：</span></td>
<td><input name="config[allowcreate]" size="30" class="input" value="$o_allowcreate"> （0 或 留空 表示没限制）</td></tr>

<tr class="tr3"><td><span class="xia2">会员加入群组至少需交纳的{$moneyname}数：</span></td>
<td><input name="config[joinmoney]" size="30" class="input" value="$o_joinmoney"></td></tr>

<tr class="tr3"><td><span class="xia2">每个会员最多能加入群组的个数：</span></td>
<td><input name="config[allowjoin]" size="30" class="input" value="$o_allowjoin"> （0 或 留空 表示没限制）</td></tr>

<tr class="tr3"><td><span class="xia2">群组容纳会员最大值：</span></td>
<td><input name="config[memberfull]" size="30" class="input" value="$o_memberfull"> （0 或 留空 表示没限制）</td></tr>

<tr class="tr3"><td><span class="xia2">群组标志图片最大尺寸：</span></td>
<td><input name="config[imgsize]" size="30" class="input" value="$o_imgsize">（单位k，0 或 留空 则按论坛模式配置）</td></tr>

<tr class="tr3"><td><span class="xia2">群组标志图片宽高范围：</span></td>
<td><input name="config[imgwidth]" size="8" class="input" value="$o_imgwidth"> 宽
<input name="config[imgheight]" size="8" class="input" value="$o_imgheight"> 高 （0 或 留空 表示没限制）</td></tr>

<tr class="tr3"><td><span class="xia2">允许创建群组的用户组：</span><br/>（全不选则允许所有用户组创建）</td>
<td>$creategroup</td></tr>

</table>
<br><center><input type="submit" class="btn" value="提 交"></center></form><br/>
<!--
EOT;
}elseif($action=='class'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">基本设置</a></li>
<li><a href="$basename&action=class" class="two">分类管理</a></li>
<li><a href="$basename&action=colony">群组管理</a></li>
<!-- <li><a href="$basename&action=log">日志管理</a></li> -->
<li><a href="$basename&action=argument">帖子管理</a></li>
<li><a href="$basename&action=cache">更新缓存</a></li>
</ul>
<div class="c"></div>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="update_cl">
<input type="hidden" name="step" value="edit">
<h2>分类管理</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3"><td>ID</td>
<td>分类名称</td>
<td>群组个数</td>
<td class="tal">删除</td></tr>
<!--
EOT;
$id=0;
foreach($o_classdb as $value){
$id++;print <<<EOT
-->
<tr class="tr3 tac"><td>$id</td>
<td><input name="selid[$value[cid]]" class="input" value="$value[cname]" size="20" maxlength="20" /></td>
<td>$value[cnsum]</td>
<td><a class="fourm-two" title="删除" onclick="return checkdelclass('$basename&action=update_cl&step=del&id=$value[cid]')"><span class="del"></span></a></td></tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br><center><input type="submit" value="提 交" class="btn"></center></form><br>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="update_cl">
<input type="hidden" name="step" value="add">
<h2>添加分类 <span class="w">[ <a style="cursor:pointer;" onclick="return addinput();">+</a> / <a style="cursor:pointer;" onclick="return delinput();">-</a> ]</span></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="35%">分类名称</td>
<td id="addinput"><input class="input" name="cname[]" id="ip_0" size="50"></td></tr>
</table>
<br><center><input type="submit" class="btn" value="提 交"></center></form>
<script language="JavaScript">
var ip=0;
function checkdelclass(url){
	if (!confirm("您确定要删除此分类吗?")) {
		return false;
	}
	location.href = url;
}
function addinput(){
	ip++;
	getObj('addinput').innerHTML += '<span id="ip_'+ip+'"><br /><input class="input" name="cname[]" size="50"></span>';
}
function delinput(){
	if (ip>0) {
		getObj('addinput').removeChild(getObj('ip_'+ip));
		ip--;
	}
}
</script>
<!--
EOT;
}elseif($action=='colony'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">基本设置</a></li>
<li><a href="$basename&action=class">分类管理</a></li>
<li><a href="$basename&action=colony" class="two">群组管理</a></li>
<!-- <li><a href="$basename&action=log">日志管理</a></li> -->
<li><a href="$basename&action=argument">帖子管理</a></li>
<li><a href="$basename&action=cache">更新缓存</a></li>
</ul>
<div class="c"></div>


<form action="$basename&" method="post">
<input type="hidden" name="action" value="update_c">
<input type="hidden" name="step" value="edit">
<h2>群组管理</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3"><td>ID</td>
<td>分类管理</td>
<td>分类名称</td>
<td class="tal">删除</td></tr>
<!--
EOT;
foreach($colonys as $value){
$id++;print <<<EOT
-->
<tr class="tr3 tac">
<td>$id</td>
<td><input class="input" name="cname[$value[id]]" value="$value[cname]" size="20" maxlength="20" /></td>
<td><select name="cid[$value[id]]" style="width:70%"><option value=""></option>
<!--
EOT;
foreach($o_classdb as $k => $v){
$selected = $value[classid]==$k ? 'selected' : '';
print <<<EOT
-->
<option value="$k" $selected>$v</option>
<!--
EOT;
}print <<<EOT
-->
</select></td>
<td><a class="fourm-two" href="$basename&action=update_c&step=del&id=$value[id]" title="删除"><span class="del"></span></a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br/>
$pages<br/>
<center><input class="btn" type="submit" value="提 交"></center>
</form><br/>
<!--
EOT;
}elseif($action=='log'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">基本设置</a></li>
<li><a href="$basename&action=class">分类管理</a></li>
<li><a href="$basename&action=colony">群组管理</a></li>
<li><a href="$basename&action=log" class="two">日志管理</a></li>
<li><a href="$basename&action=argument">帖子管理</a></li>
<li><a href="$basename&action=cache">更新缓存</a></li>
</ul>
<div class="c"></div>
<form action="$basename&" method="post">
<h2>描述搜索</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td align="center">关键字：<input name="keyword" class="input"> <input type="submit" class="btn" style="margin-bottom:4px;" value="提 交"></td></tr>
</table>
</form>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="log">
<input type="hidden" name="step" value="del">
<h2>操作记录</h2>
<table width="98%" cellspacing="1" cellpadding="5" align="center" class="i_table">
<tr class="tr3 tac s3"><td width="5%">ID</td>
<td width="5%">类型</td>
<td width="15%">$cn_name</td>
<td width="15%">用户名</td>
<td width="*">描述</td>
<td width="15%">日期</td>
<td width="5%">删除</td></tr>
<!--
EOT;
foreach($logdb as $value){
$id++;print <<<EOT
-->
<tr class="tr3 tac"><td>$id</td>
<td>{$lang[logtype][$value[type]]}</td>
<td><a href="hack.php?H_name=colony&cyid=$value[field2]&job=view&id=$value[field2]" target="_blank">$value[field3]</a></td>
<td>$value[username1]</td>
<td><div style="table-layout: fixed;word-wrap: break-word" align="left">$value[descrip]</div></td>
<td>$value[timestamp]</td>
<td><input type="checkbox" name="selid[]" value="$value[id]"></td></tr>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
$pages<br />
<center><input type="button" class="btn" name="chkall" value="全 选" onclick="CheckAll(this.form,'2')">
<input type="submit" value="提 交" class="btn"></center><br/>
</form>
<script language=JavaScript>
function CheckAll(form,len){
	for (var i=0;i<form.elements.length-len;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
</script>
<!--
EOT;
}elseif($action=='cache'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">基本设置</a></li>
<li><a href="$basename&action=class">分类管理</a></li>
<li><a href="$basename&action=colony">群组管理</a></li>
<!-- <li><a href="$basename&action=log">日志管理</a></li> -->
<li><a href="$basename&action=argument">帖子管理</a></li>
<li><a href="$basename&action=cache" class="two">更新缓存</a></li>
</ul>
<div class="c"></div>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="setting">
<input type="hidden" name="step" value="updatecache">
<h2>缓存更新</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="40%">更新分类管理</td><td><input class="btn" type="submit" value="提 交"></td></tr>
</form>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="update_cl">
<input type="hidden" name="step" value="updatecache">
<tr class="tr3"><td>更新朋友圈分类</td><td><input type="submit" class="btn" value="提 交"></td></tr>

</form>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="cache">
<input type="hidden" name="step" value="delcolony">
<tr class="tr3"><td>清除没有分类的朋友圈 <br/>( 此将删除关联没有分类的朋友圈所有东西，删除后不能再恢复，请确定<br/>若只是修改朋友圈分类，请到<a href="$basename&action=colony" class="xia">朋友圈管理</a> 处修改分类 )</td><td><input type="submit" class="btn" value="提 交"></td></tr>
</table>
</form>
<!--
EOT;
}elseif($action == 'argument'){
if($step == 'list'){print<<<EOT
-->
<ul class="nav3">
<li><a href="$basename">基本设置</a></li>
<li><a href="$basename&action=class">分类管理</a></li>
<li><a href="$basename&action=colony">群组管理</a></li>
<!-- <li><a href="$basename&action=log">日志管理</a></li> -->
<li><a href="$basename&action=argument" class="two">帖子管理</a></li>
<li><a href="$basename&action=cache">更新缓存</a></li>
</ul>
<div class="c"></div>
<form action="$basename&action=argument" method="post">
<input type="hidden" name="step" value="delete">
<h2>文章列表</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3">
<td width="5%">ID</td>
<td width="30%">标 题</td>
<td width="15%">作 者</td>
<td width="15%">所属群组</td>
<td width="10%">发表日期</td>
<td width="10%">类型</td>
<td width="5%">置顶</td>
<td width="5%"></td></tr>
<!--
EOT;
$id = ($page-1)*$perpage;
foreach($argumentdb as $value){
$value['tpcid'] = $value['tpcid'] == 0 ? '主题' : '回复';
$value['topped'] = $value['topped'] == 0 ? '--' : ($value['topped'] == 1 ? '置顶1' : ($value['topped'] == 2 ? '置顶2' : '置顶3'));
$id++;print <<<EOT
-->
<tr class="tr3 tac">
<td>$id</td>
<td><a href="hack.php?H_name=colony&cyid=$value[gid]&job=readboard&tid=$value[baktid]" target="_blank">$value[subject]</a></td>
<td><a href="u.php?action=show&uid=$value[authorid]" target="_blank">$value[author]</td>
<td><a href="hack.php?H_name=colony&job=view&cyid=$value[gid]" target="_blank">$value[cname]</a></td>
<td>$value[postdate]</td>
<td>$value[tpcid]</td>
<td>$value[topped]</td>
<td><input type="checkbox" name="selid[]" value="$value[tid]"></td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br />
$pages<br/>
<center><input type="button" name="chkall" class="btn" value="全 选" onclick="CheckAll(this.form)"> <input class="btn" type="submit" name="button" value="删除" onclick="return Checkdel();"></center><br/>
</form>
<script language="JavaScript">
function Checkdel(){
	if (!confirm("您确定要删除选中项吗?")) {
		return false;
	}else{
		return true;
	}
}
</script>
<!--
EOT;
}else{print<<<EOT
-->
<ul class="nav3">
<li><a href="$basename">基本设置</a></li>
<li><a href="$basename&action=class">分类管理</a></li>
<li><a href="$basename&action=colony">群组管理</a></li>
<!-- <li><a href="$basename&action=log">日志管理</a></li> -->
<li><a href="$basename&action=argument" class="two">帖子管理</a></li>
<li><a href="$basename&action=cache">更新缓存</a></li>
</ul>
<div class="c"></div>

<script language="JavaScript" src="js/date.js"></script>
<form action="$basename&action=argument" method="post">
<input type="hidden" name="step" value="list">
<h2>帖子搜索</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="30%">群组分类: </td>
<td><select name="cid" style="width:100px;">
<option value="-1">不限制</option>
$classoption
</select></td></tr>

<tr class="tr3"><td>类型:</td>
<td>
<select name="ttype">
<option value="1">主题</option>
<option value="2">回复</option>
</select>
</td></tr>

<tr class="tr3"><td>作 者: (可使用通配符 "*")</td>
<td><input name="author" size="30" class="input" value="">
<input type="checkbox" name="ckauthor" value="1" CHECKED>
精确匹配</td></tr>

<tr class="tr3"><td>关键字: (可使用通配符 "*")</td>
<td><input name="keyword" size="30" class="input" value="">
<select name="ktype">
<option value="subject">标题</option>
<option value="content">内容</option>
</select>
<input type="checkbox" name="ckkeyword" value="1">
精确匹配</td></tr>

<tr class="tr3"><td>发表日期: (格式 yyyy-mm-dd)</td>
<td><input type="text" name="postdate_s" value="" id="postdate_s" onclick="javascript:ShowCalendar(this.id)" class="input"> - <input type="text" name="postdate_e" id="postdate_e" value="" onclick="javascript:ShowCalendar(this.id)" class="input"></td></tr>

<tr class="tr3"><td>管理选项: </td>
<td>置顶: <select name="topped">
<option value="-1">不限制</option>
<option value="1">I</option>
<option value="2">II</option>
<option value="3">III</option>
</select></td></tr>

<tr class="tr3"><td>排序: </td>
<td><select name="orderby" style="width:100px;">
<option value="postdate">发表日期</option>
<option value="authorid">帖子作者</option>
</select>
<input type="radio" name="sc" value="desc" CHECKED> 降序
<input type="radio" name="sc" value="asc"> 升序</td></tr>
<tr class="tr3"><td>每页显示条数 </td>
<td><input name="perpage" size="15" class="input" value="30"></td></tr>
</table><br />
<center><input type="submit" value="提 交" class="btn"></center><br/>
</form>
<!--
EOT;
}}include_once PrintEot('adminbottom');
?>-->